from celery import Celery

import os
if not os.getenv("DJANGO_SETTINGS_MODULE"):
    os.environ["DJANGO_SETTINGS_MODULE"] = "MD_shop.settings.dev"
    
    
app = Celery("meiduo")

app.config_from_object('celery_tasks.config')

# celery -A celery_tasks.main worker --loglevel=info
#自动注册celery任务
app.autodiscover_tasks(['celery_tasks.sms',"celery_tasks.email", 'celery_tasks.html'])